﻿@{
    ViewBag.Title = "QuestionAdd";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<link href="~/Resources/Css/common.css" rel="stylesheet" />
<script src="~/resources/plugins/bootstrap-filestyle/1.2.1/bootstrap-filestyle.min.js"></script>
<script src="~/resources/plugins/ckeditor/4.5.5/standard/ckeditor.js"></script>
<script src="~/resources/bootstrapvalidator/js/bootstrapValidator.min.js"></script>
<link href="~/resources/bootstrapvalidator/css/bootstrapValidator.min.css" rel="stylesheet" />
<script src="~/Resources/jquery-confirm/js/jquery-confirm.js"></script>
<link href="~/Resources/jquery-confirm/css/jquery-confirm.css" rel="stylesheet" />
<script src="~/Resources/Script/HtmlUtil.js"></script>
<style type="text/css">
    .standardul li {
        list-style: none;
        float: left;
        width: 100px;
    }

        .standardul li input[type=checkbox] {
            width: 20px;
            height: 20px;
        }

        .standardul li label {
            padding-left: 10px;
            font-size: 20px;
        }
</style>
<form id="addQuestionForm">
    <div class="boxmain">
        <!-- box / title -->
        <div class="title">
            <ol class="breadcrumb">
                <li><a href="javascript:void(0);" onclick="goBack()">Questions Management</a></li>
                <li class="active">Create Questions</li>
            </ol>
        </div>

        <div class="form-horizontal">
            <div class=" form-group">
                <div class="col-sm-4">
                    <label class="col-sm-4 control-label"><span>*</span>Test&nbsp;Type：</label>
                    <div class="col-sm-8">
                        <select class="form-control" id="TestType">
                            <option value="">Select Test Type</option>
                            <option value="1">OnlineTest</option>
                            <option value="2">Interview</option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-4">
                    <label class="col-sm-4 control-label"><span>*</span>Modality：</label>
                    <div class="col-sm-8">
                        @{
                            IQueryable<Exam.Model.Modality> provincelist = ViewData["ModalityList"] as IQueryable<Exam.Model.Modality>;
                            List<SelectListItem> list = new List<SelectListItem>();
                            list.Add(new SelectListItem { Text = "Select Modality", Value = "", Selected = true });
                            foreach (Exam.Model.Modality item in provincelist)
                            {
                                list.Add(new SelectListItem { Text = item.ModalityName, Value = item.ModalityID.ToString() });
                            }
                        }
                        @Html.DropDownList("ModalitySelect", list, new { @class = "form-control" })
                    </div>
                </div>
                <div class="col-sm-4">
                    <label class="col-sm-4 control-label"><span>*</span>Product：</label>
                    <div class="col-sm-8">
                        <select class="form-control" id="ProductSelect">
                            <option value="">Select Product</option>
                            <option value="1">OnlineTest</option>
                            <option value="2">Interview</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-4">
                    <label class="col-sm-4 control-label"><span>*</span>Level：</label>
                    <div class="col-sm-8">
                        <select class="form-control" id="Levelselect">
                            <option value="">Select Level</option>
                            <option value="1">1</option>
                            <option value="2">2</option>
                            <option value="3">3</option>
                            <option value="4">4</option>
                            <option value="5">5</option>

                        </select>
                    </div>
                </div>
                <div class="col-sm-4">
                    <label class="col-sm-4 control-label"><span>*</span>Block：</label>
                    <div class="col-sm-8">
                        <select class="form-control" id="BlockSelect">
                            <option value="1">Select Level</option>
                            <option value="1">High</option>
                            <option value="2">Medium</option>
                            <option value="3">Low</option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-4">
                    <label class="col-sm-4 control-label"><span>*</span>Is&nbsp;Active：</label>
                    <div class="col-sm-8">

                        <select class="form-control" id="PIsActive" name="PIsActive">
                            <option value="">Select Status</option>
                            <option value="0">Active</option>
                            <option value="1">InActive</option>

                        </select>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12">
                    <div class="col-sm-2">
                        <label class="control-label"><span>*</span>Test&nbsp;Question：</label>
                    </div>
                    <div class="col-sm-10">
                        <textarea name="QuestionCentext" class="form-control" id="QuestionCentext" rows="6" maxlength="200"></textarea>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12">
                    <div class="col-sm-2">
                        <label class="control-label"><span>*</span>Answer&nbsp;OptionA：</label>
                    </div>
                    <div class="col-sm-10">
                        <textarea name="AnswerCentext" class="form-control" id="AnswerACentext" rows="5" maxlength="200"></textarea>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-12">
                    <div class="col-sm-2">
                        <label class="control-label"><span>*</span>Answer&nbsp;OptionB：</label>

                    </div>
                    <div class="col-sm-10">
                        <textarea name="AnswerCentext" class="form-control" id="AnswerBCentext" rows="5" maxlength="200"></textarea>
                    </div>
                </div>
            </div>
            <div class="form-group" id="Addpan">
                <div class="col-sm-12">
                    <div class="col-sm-2">
                    </div>
                    <div class="col-sm-10">
                        <span id="Addspan" class="btn glyphicon glyphicon-plus" />
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12">
                    <div class="col-sm-2">
                        <label class="control-label"><span>*</span>Standard&nbsp;Answer：</label>
                    </div>
                    <div class="col-sm-10">
                        <ul class="standardul">
                            <li>
                                <input type="checkbox" id="A" name="Standard" value="1" /><label for="A">A</label>
                            </li>
                            <li>
                                <input type="checkbox" id="B" name="Standard" value="2" /><label for="A">B</label>
                            </li>

                        </ul>

                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-10">
                    <input type="submit" class="col-sm-1 btn btn-primary" value="Save" onclick="chengeBack(true)" />
                    <div class=" col-sm-1"></div>
                    <input type="submit" class="col-sm-2 btn btn-primary" value="Save & Continue" onclick="chengeBack(false)" />
                    <div class=" col-sm-1"></div>
                    <input type="button" class="col-sm-1 btn btn-default" onclick="javascript:goBack();" value="Back" />
                    <input type="button" onclick="javascript:SubData();" value=" Continue" />
                </div>
            </div>
        </div>
    </div>
</form>

<script src="~/Resources/Script/Questions/QuestionAdd.js"></script>
<script src="~/Resources/Script/Product/ModalityGetProduct.js"></script>